import axios from "axios";
import GLOBAL from "./openfaas_js/GLOBAL.js";

const {AUTH_riscv64, AUTH_x86, AUTH_x86swarm, AUTH_x86qemu} = GLOBAL
const SERVER_PREFIX_riscv64 = `http://${AUTH_riscv64.HOST}:7280/`
const SERVER_PREFIX_x86qemu = `http://${AUTH_x86qemu.HOST}:7280/`
const SERVER_PREFIX_LOCAL = `http://localhost:7280/`

const LOOP_COUNT = 1000

await axios.post(SERVER_PREFIX_LOCAL + "run", {
    funcName: "python3-strlen",
    count: 100,
})
    .then(function (response) {
        console.log(response.data);
    })
    .catch(function (error) {
        console.log(error);
    });